import { adminUrl } from "@/utils/baseUrl.js";
import request from "@/utils/request";

// 创建学校管理-班级
export function createClasses(data) {
  return request({
    url: adminUrl + "/collegebase/classes/create",
    method: "post",
    data: data,
  });
}

// 更新学校管理-班级
export function updateClasses(data) {
  return request({
    url: adminUrl + "/collegebase/classes/update",
    method: "put",
    data: data,
  });
}

// 删除学校管理-班级
export function deleteClasses(id) {
  return request({
    url: adminUrl + "/collegebase/classes/delete?id=" + id,
    method: "delete",
  });
}

// 获得学校管理-班级
export function getClasses(id) {
  return request({
    url: adminUrl + "/collegebase/classes/get?id=" + id,
    method: "get",
  });
}

// 获得学校管理-班级分页
export function getClassesPage(query) {
  return request({
    url: adminUrl + "/collegebase/classes/page",
    method: "get",
    params: query,
  });
}
// 导出学校管理-班级 Excel
export function exportClassesExcel(query) {
  return request({
    url: adminUrl + "/collegebase/classes/export-excel",
    method: "get",
    params: query,
    responseType: "blob",
  });
}
